import { createBrowserRouter } from 'react-router-dom';
import PageLayout from '../layout/index.jsx';
import Home from '@/pages/home/index.jsx';
import PlayGround from '@/pages/playground/index.jsx';
import Welcome from '@/pages/welcome/index.jsx';

import NotFound from './NotFound.jsx'
// 路由守卫
import AuthRoute from './authRoute.jsx';
const router = createBrowserRouter([
  {
    path: '/',
    element: <Welcome />
  },
  {
    path: '/home',
    element: <PageLayout />,
    children: [
      {
        index: true,
        element: <Home />
      },
      {
        path: 'playGround',
        element: <PlayGround />
      }
    ]
  },
  {
    path: '*',
    element: <NotFound />
  }
]);

export default router;